package com.example.democlient.network.serverpackets;

import java.nio.ByteBuffer;

import com.example.democlient.model.Task;
import com.example.democlient.network.ServerConnection;
import com.example.democlient.network.packet.ServerPacket;

/**
 * 向服务器发送
 * @author Administrator
 *
 */
public class SM_TASK_ADDRESS_UPDATE_REQUEST extends ServerPacket
{

	private final Task task;
	public SM_TASK_ADDRESS_UPDATE_REQUEST(Task task)
	{
		super(0x10);
		this.task=task;
	}

	@Override
	protected void writeImpl(ServerConnection con, ByteBuffer buf)
	{
		writeD(buf,task.getId());
		writeC(buf,task.getFlag());
		writeS(buf,task.getTelephone());
		writeS(buf,task.getRemark());
		writeS(buf,task.getAreaName());
		writeD(buf,task.getAreaId());
		writeS(buf,task.getAddressStr());
		writeDF(buf,task.getXaxis());
		writeDF(buf,task.getYaxis());
		writeS(buf,task.getAccount());
		writeD(buf,task.getLocTypeFlag());
	}
}
